package view.hero
{
import framework.core.ComponentBuilder;

import values.item.EquipmentItemValue;

import view.component.window.WindowComponent;

/**
 * HeroEquipSelectionUI
 * @author jliang
 *
 */
public class HeroEquipSelectionUI extends WindowComponent
{
	//==========================================================================
	//  Class constants
	//==========================================================================
	public static function showHero(equipment:EquipmentItemValue):HeroEquipSelectionUI
	{
		var ui:HeroEquipSelectionUI = ComponentBuilder.create(HeroEquipSelectionUI);
		ui.showHero(equipment);
		return ui;
	}
	//==========================================================================
	//  Constructor
	//==========================================================================
	public function HeroEquipSelectionUI()
	{
		super();
	}
	//==========================================================================
	//  Overridden methods: Component
	//==========================================================================
	override protected function get skinReference():String
	{
		return "swf.ui.HeroEquipSelectionUISkin";
	}
	
	override protected function get proxyMapping():Array
	{
		return [ 
			{ skin:"", classRef: HeroEquipSelectionUIProxy, id:"window" }
		];
	}
	
	public function showHero(equipment:EquipmentItemValue):void
	{
		HeroEquipSelectionUIProxy(window).showHero(equipment);
		
		show();
	}
	
	override public function get width():Number
	{
		return 554;
	}
	
	override public function get height():Number
	{
		return 233;
	}
}
}


